Oops Basics

  • Note

    1. What is oops

    Object oriented programming is a technique to develop logical modules. It allows us to package together data states (member variables) and functionality (member functions) to modify those data states

    2. Features or benefits to object-oriented programming

    1. Encapsulation:

    in OOP, you bundle code into a single unit where you can determine the scope of each piece of data.

    2. Abstraction:

    by using classes, you are able to generalize your object types, simplifying your program.

    3. Inheritance:

    because a class can inherit attributes and behaviors from another class, you are able to reuse more code.

    4. Polymorphism:

    one class can be used to create many objects, all from the same flexible piece of code.

    3. advantages of using OOPs

    OOPs is very helpful in solving very complex level of problems.

    OOPs, promote code reuse, thereby reducing redundancy. (Inheritance)

    OOPs also helps to hide the unnecessary details with the help of Data Abstraction. (Private, public and protected)